package mcsm.OperationCenter;


import mcsm.DataBaseIntegration.DataBaseConnect;
import mcsm.DataBaseIntegration.EditVIPConnect;
import mcsm.DataBaseInterface.Connector;
import mcsm.Model.VIP;

public class EditVIP{
	
	DataBaseConnect database;
	Connector connector;

	public EditVIP() {
		database = DataBaseConnect.getDatabase();
	}
	
	public VIP editVIP(VIP tempVIP, String name, String password,
			String phone, String area){
		
		tempVIP.setName(name);
		tempVIP.setPassword(password);
		tempVIP.setPhone(phone);
		tempVIP.setArea(area);
		
		connector=new EditVIPConnect(tempVIP);
		database.connect(connector);
		
		return tempVIP;
	}
}
